package com.xq.common.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import com.google.gson.Gson;

public class XiaoQuUtils
{
    public static final Gson GSON = new Gson();
    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss");
    public static String getDateTime()
    {
        //public static final String FORMATTER = "yyyy年MM月dd日HH时mm分ss秒";
        //public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(FORMATTER);
        Calendar calendar = Calendar.getInstance();
        return DATE_FORMAT.format(calendar.getTime());

    }
    
    public static String getFileExtension(String fileName)
    {
    	int dotIndex = fileName.lastIndexOf(".");
    	if (dotIndex == -1)
    	{
    		return "";
    	}
    	return fileName.substring(dotIndex + 1);
    }
    
    /**
     * @param args
     */
    public static void main(String[] args) {
		System.out.println(getFileExtension("test.png"));
	}
    
    
}
